Feature: WiFi Channel Width + LiveChart2 migration#3462
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the Wi-Fi channel visualization by adding channel bandwidth (width) support and migrates the Wi-Fi channel charts from the legacy LiveCharts.Wpf stack to LiveChartsCore.SkiaSharpView.WPF (LiveCharts2), including a redesigned tooltip and 6 GHz chart handling.
Changes:
- Add channel bandwidth detection (native
wlanapi.dllBSS list parsing + heuristic fallback) and surface it in the Wi-Fi model and UI. - Migrate Wi-Fi channel charts to LiveCharts2 with new axes/sections setup, new tooltip control, and 6 GHz split view.
- Remove old LiveCharts.Wpf tooltip and related converters/dependencies.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| Source/NETworkManager/Views/WiFiView.xaml.cs | Persists/restores inner channel-tab selection across UI rebuilds. |
| Source/NETworkManager/Views/WiFiView.xaml | Migrates charts to LiveCharts2, adds channel width column/menu item, adds 6 GHz split charts. |
| Source/NETworkManager/ViewModels/WiFiViewModel.cs | Replaces LiveCharts.Wpf series/axes with LiveCharts2 setup and series generation including bandwidth trapezoids. |
| Source/NETworkManager/NETworkManager.csproj | Removes LiveCharts.Wpf package reference, keeps LiveCharts2 package. |
| Source/NETworkManager/Controls/WiFiChannelPoint.cs | Adds a chart point type that carries a reference to the originating Wi-Fi network (for tooltip). |
| Source/NETworkManager/Controls/LvlChartsWiFiChannelTooltip.xaml.cs | Removes legacy LiveCharts.Wpf tooltip implementation. |
| Source/NETworkManager/Controls/LvlChartsWiFiChannelTooltip.xaml | Removes legacy LiveCharts.Wpf tooltip XAML. |
| Source/NETworkManager/Controls/LiveChartsWiFiChannelTooltip.xaml.cs | Adds new LiveCharts2 tooltip implementation based on WPF Popup. |
| Source/NETworkManager/Controls/LiveChartsWiFiChannelTooltip.xaml | Adds new tooltip UI template. |
| Source/NETworkManager.Models/Network/WlanApi.cs | Adds native WLAN interop to parse channel bandwidth from 802.11 IEs. |
| Source/NETworkManager.Models/Network/WiFiNetworkInfo.cs | Adds ChannelBandwidth (MHz) to the Wi-Fi network model. |
| Source/NETworkManager.Models/Network/WiFi.cs | Integrates channel bandwidth lookup (native + heuristic) into scan results. |
| Source/NETworkManager.Localization/Resources/Strings.resx | Adds localized string key ChannelWidth. |
| Source/NETworkManager.Localization/Resources/Strings.Designer.cs | Regenerates strongly-typed accessor for ChannelWidth. |
| Source/NETworkManager.Converters/WiFiDBMReverseConverter.cs | Removes obsolete converter used by the legacy tooltip. |
| Source/NETworkManager.Converters/NETworkManager.Converters.csproj | Removes LiveCharts.Wpf package reference from converters project. |
| Source/NETworkManager.Converters/LvlChartsHeaderConverter.cs | Removes obsolete converter used by the legacy tooltip. |
Files not reviewed (1)
- Source/NETworkManager.Localization/Resources/Strings.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…github.com/BornToBeRoot/NETworkManager into feature/wifi-channel-width-and-livecharts2
Comment on lines
265
to
272
| /// Get the Wi-Fi channel from channel frequency. | ||
| /// </summary> | ||
| /// <param name="gigahertz">Input like 2.422 or 5.240.</param> | ||
| /// <returns>WiFi channel like 3 or 48.</returns> | ||
| public static int GetChannelFromChannelFrequency(double gigahertz) | ||
| /// <returns>Wi-Fi channel like 3 or 48.</returns> | ||
| private static int GetChannelFromChannelFrequency(double gigahertz) | ||
| { | ||
| return gigahertz switch | ||
| { |
Comment on lines
1211
to
1214
| ConfigurationManager.Current.IsChildWindowOpen = true; | ||
|
|
||
| return Application.Current.MainWindow.ShowChildWindowAsync(childWindow); | ||
| Application.Current.MainWindow.ShowChildWindowAsync(childWindow); | ||
| } |
| Values = GetChartValues(network, index), | ||
| PointGeometry = null, | ||
| LineSmoothness = 0 | ||
| WiFiRadio.GHz2dot4 => (frequencyMHz - 2407) / 5.0, |
Comment on lines
+40
to
+43
| /// <summary> | ||
| /// The channel bandwidth in MHz (e.g. 20, 40, 80, 160). A value of 0 means unknown. | ||
| /// </summary> | ||
| public int ChannelBandwidth { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
Related issue(s)
Copilot generated summary
Provide a Copilot generated summary of the changes in this pull request.
Copilot summary
This pull request removes all dependencies on the old LiveCharts.Wpf charting library and migrates the Wi-Fi channel chart tooltip functionality to use LiveChartsCore. It introduces a new, richer tooltip for Wi-Fi channel charts, displaying SSID, RSSI, channel, and bandwidth, and extends the Wi-Fi network model to include channel bandwidth information. Several obsolete files and converters are removed, and new supporting classes are added for the updated charting logic.
Migration to LiveChartsCore and Removal of LiveCharts.Wpf:
LiveCharts.Wpfare removed from project files, and related converters and tooltip implementations (LvlChartsWiFiChannelTooltip.xaml,.cs, and associated converters) are deleted. [1] [2] [3] [4] [5] [6]Wi-Fi Channel Chart Tooltip Redesign:
LiveChartsWiFiChannelTooltip, is added, providing a modern UI for displaying Wi-Fi network details (SSID, RSSI, channel, and bandwidth) using LiveChartsCore. [1] [2]WiFiChannelPoint, is introduced to represent points on the chart, each associated with a specific Wi-Fi network.Wi-Fi Model Enhancements:
WiFiNetworkInfomodel is extended to include aChannelBandwidthproperty (in MHz), and logic is added to determine the bandwidth using native APIs or heuristics based on radio/PHY kind. [1] [2] [3]WiFi.csare made private for encapsulation, and new methods are added for bandwidth estimation. [1] [2] [3]Localization:
Other:
To-Do
Contributing
By submitting this pull request, I confirm the following: